//
//  YBBlogNavController.m
//  Cocoachina
//
//  Created by 尚往文化 on 17/9/13.
//  Copyright © 2017年 YBing. All rights reserved.
//

#import "YBBlogNavController.h"
#import "YBBlogController.h"
#import "Define.h"

@interface YBBlogNavController ()

@end

@implementation YBBlogNavController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    YBBlogController *vc = [YBBlogController new];
    vc.url = @"http://blog.cocoachina.com/new/";
    YBBaseMenuControllerItem *item = [YBBaseMenuControllerItem itemWithTitle:@"最新" vc:vc];
    
    YBBlogController *vc1 = [YBBlogController new];
    vc1.url = @"http://blog.cocoachina.com/hot/";
    YBBaseMenuControllerItem *item1 = [YBBaseMenuControllerItem itemWithTitle:@"最热" vc:vc1];
    self.items = @[item, item1];

    
    UIView *statusBar = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenW, 20)];
    statusBar.backgroundColor = kNavColor;
    [self.view addSubview:statusBar];
    
    self.navigationItem.title = @"";
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}

@end
